Solution B (balance PD solution)